// ARMA2

#define rect(X,Y,W,H) \
    x=__EVAL(##X##); \
    y=__EVAL(##Y##); \
    w=__EVAL(##W##); \
    h=__EVAL(##H##)


#define localString(id) localize( "STR:RLS:SQFConsole::" + id )
#define local(id) __EVAL( localString(id) )
#define localFormat(str, id) __EVAL( format[str, localString(id)] )

#define fontsize 0.034

class RscVdmjSqfCalculator {
    class RscRLSControlsGroup: RscControlsGroup {
        style = 0x10;
        class ScrollBar {
            color[] = {1, 1, 1, 0.6};
            colorActive[] = {1, 1, 1, 1};
            colorDisabled[] = {1, 1, 1, 0.3};
            thumb = "\ca\ui\data\ui_scrollbar_thumb_ca.paa";
            arrowFull = "\ca\ui\data\ui_arrow_top_active_ca.paa";
            arrowEmpty = "\ca\ui\data\ui_arrow_top_ca.paa";
            border = "\ca\ui\data\ui_border_scroll_ca.paa";
        };
        class VScrollbar {
            color[] = {1, 1, 1, 1};
            width = 0.021;
            autoScrollSpeed = -1;
            autoScrollDelay = 5;
            autoScrollRewind = 0;
        };
        class HScrollbar {
            color[] = {1, 1, 1, 1};
            height = 0.028;
        };
    };

    class RscRLSText : RscText {
        colorBackground[] = {0, 0, 0, 0};
        colorText[] = {0.6640625, 0.6875, 0.56640625, 1};
        sizeEx = 0.03921;
    };

    class RscRLSListBox : RscListBox {
        rowHeight = 0;
        colorText[] = {0.6640625, 0.6875, 0.56640625, 1};
        colorScrollbar[] = {0.95, 0.95, 0.95, 1};
        colorSelect[] = {0.95, 0.95, 0.95, 1};
        colorSelect2[] = {0.95, 0.95, 0.95, 1};
        colorSelectBackground[] = {0.3359375, 0.35546875, 0.2578125, 1};
        colorSelectBackground2[] = {0.543, 0.5742, 0.4102, 1};
        colorBackground[] = {0, 0, 0, 1};
        font = "Zeppelin32";
        sizeEx = 0.03921;
        color[] = {1, 1, 1, 1};
        maxHistoryDelay = 1;
        autoScrollSpeed = -1;
        autoScrollDelay = 5;
        autoScrollRewind = 0;
    };
    class RscRLSHTML : RscHTML {
        sizeEx = 0.03921;
        text = ;
        colorBackground[] = {0, 0, 0, 0};
        colorText[] = {0.6640625, 0.6875, 0.56640625, 1};
        colorBold[] = {0.8203125, 0.8359375, 0.77734375, 1}; //{0.543, 0.5742, 0.4102, 1};
        colorLink[] = {0.6,   0.8392, 0.4706, 1};
        colorLinkActive[] = {1, 0.537, 0, 1};
        colorPicture[] =    {1, 1, 1, 1};
        colorPictureLink[] = {1, 1, 1, 1};
        colorPictureSelected[] = {1, 1, 1, 1};
        colorPictureBorder[] = {0, 0, 0, 0};
        tooltipColorText[] = {0, 0, 0, 1};
        tooltipColorBox[] = {0, 0, 0, 0.5};
        tooltipColorShade[] = {1, 1, 0.7, 1};
        class H1 {
            font = "Zeppelin32";
            fontBold = "Zeppelin33";
            sizeEx = 0.035;
        };
        class H2 {
            font = "Zeppelin32";
            fontBold = "Zeppelin33";
            sizeEx = 0.032;
        };
        class H3 {
            font = "Zeppelin32";
            fontBold = "Zeppelin33";
            sizeEx = 0.03;
        };
        class H4 {
            font = "Zeppelin33Italic";
            fontBold = "Zeppelin33";
            sizeEx = 0.028;
        };
        class H5 {
            font = "Zeppelin32";
            fontBold = "Zeppelin33";
            sizeEx = 0.026;
        };
        class H6 {
            font = "LucidaConsoleB";
            fontBold = "LucidaConsoleB";
            align = "left";
            sizeEx = 0.022;
        };
        class P {
            font = "Zeppelin32";
            fontBold = "Zeppelin33";
            align = "left";
            colorText[] = {1, 1, 1, 1};
            color[] = {1, 1, 1, 1};
            sizeEx = 0.027;
        };
    };

    ////////////

    idd = 78934;
    movingEnable = true;

    class controlsBackground {
        class Mainback : RscPicture {
            idc = -1;
            rect(0, -.01, 1.28, 1.02);
            text = "\ca\ui\data\ui_background_controls_ca.paa";
            moving = 1;
        };
        class Title : RscStructuredText {
            idc = -1;
            rect(0, .023, 1, .06);
            class Attributes {
                font = "Zeppelin32";
                color = "#AAB091";
                align = "center";
                shadow = 1;
            };
            text = localFormat("<t size='1.3' align='center' shadow='true' shadowColor='#000000'>%1</t>", "Title");
            moving = 1;
        };
    };
    class controls {
        class CommonGroup: RscControlsGroup {
            idc = 4;
            rect(0, .1, 1.28, .90);
            class controls {
                class InputText: RscEdit {
                    idc = 100;
                    rect(.01, 0, .98, .06);
                    sizeEx = fontsize;
                    autocomplete = "scripting";
                };
                class SelectWin: RscToolBox {
                    idc = 101;
                    rect(.03, .82, .92, .05);
                    rows = 1;
                    columns = 5;
                    strings[] = {
                        local("Formated"),
                        local("Display"),
                        local("History"),
                        local("Demo"),
                        local("Help")
                    };
                };

                class ResultFormated: RscRLSListBox {
                    idc = 201;
                    sizeEx = fontsize;
                    rect(.01, .07, .98, .7);
                };
                class ResultText: RscEdit {
                    idc = 202;
                    style = ST_MULTI;
                    lineSpacing = 1;
                    sizeEx = fontsize;
                    rect(.01, .07, .98, .7);
                };
                class HistoryList: RscRLSListBox {
                    idc = 203;
                    rect(.01, .07, .98, .7);
                    sizeEx = fontsize;
                };
                class DemoFrame: RscRLSControlsGroup {
                    rect(.01, .07, .98, .7);
                    idc = 1204;
                    class controls {
                        class Demo: RscRLSHTML {
                            idc = 204;
                            rect(0, 0, .96, .8);
                            colorBorder[] = {0, 0, 0, 1};
                            filename = local("DemoVoidFile");
                            cycleLinks = 0;
                            cycleAllLinks = 0;
                        };
                    };
                };
                class HelpFrame: RscRLSControlsGroup {
                    rect(.01, .07, .98, .7);
                    idc = 1205;
                    class controls {
                        class Help: RscRLSHTML {
                            idc = 205;
                            rect(0, 0, .96, 1.6);
                            filename = local("HelpFile");
                        };
                    };
                };
            };
        };
    };
};
